<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html>
<head>
<jsp:include page="../inc.jsp"></jsp:include>
<meta http-equiv="X-UA-Compatible" content="edge" />
<title>订单查询</title>
<style>
	/*修改表头颜色*/
	.datagrid-header-row{
		color:#74a5cd;
	}
	/*弹出层*/
	#popup{
		height:474px;
		/*border:1px solid gray;*/
		/*z-index: 3;*/
		position: relative;
	}
		#popupHeader{
			width:100%;
			height:35px;
			/*border-bottom: 1px solid dodgerblue;*/
			background: #3989c8;
			color:white;
			
		}
			.Poptitle{
				display: block;
				width:100px;
				height:20px;
				text-align: center;
				line-height: 20px;
				margin-top:10px;
				float: left;
	
			}
			#payTypes{
				margin-left: -20px;
			}
			#Tableposition{
				width:100%;
				height: 300px;
				position: absolute;
				top:50px;
			}
			
</style>
<script type="text/javascript">
$(function () {
	//var a = parent.alertorderNumber; 
//	console.log(a)
//	var b = parent.bb; 
	//$("#popTable").datagrid('load',{"idList":b,"detailType":a});
	//弹出框的表格
	//console.log('${orderNumber}')
	$("#popTable").datagrid({
		url:'${ctx}/order/queryPassenger/${orderNumber}',
			striped : true,
			fit : true,
			fitColumns: false, 
			rownumbers : true,
			idField : 'id',
			//sortName : 'id',
			//sortOrder : 'asc',
			method : 'get', 
			queryParams: {
//				idList: b,
				//detailType: a
			},
			//loadFilter: function(data){ 
			  //    return data.obj; 
			  //},
			columns : [ [ {
				width : '100',
				title : '票号',
				align : 'center',
				field : 'ticketNumber',
//				hidden : true
			}, {
				width : '100',
				title : '旅客姓名',
				field : 'id',
				align : 'center',
				formatter : function(value,row){
					var lastNameEn=row.lastName_en;
					var firstNameEn=row.firstName_en;
					return "<span>"+lastNameEn+"</span>"+"<span>"+firstNameEn+"</span>"
				}
			},
			{
				width : '100',
				title : '中文姓名',
				align : 'center',
				field : 'customerName',
				formatter : function(value,row){
					var lastNamecn=row.lastName_cn;
					var firstNamecn=row.firstName_cn;
					return "<span>"+lastNamecn+"</span>"+"<span>"+firstNamecn+"</span>"
				}
			},{
				width : '80',
				title : '性别',
				align : 'center',
				field : 'sex',
				formatter : function(value,row){
					if(row.sex ==2){
						return "女";
					}else if(row.sex==1){
						return "男";
					};
				}
				
			}, {
				width : '80',
				title : '旅客类型',
				align : 'center',
				field : 'passageType',
				formatter : function(value,row){
					if(row.passageType ==3){
						return "婴儿";
					}else if(row.passageType==2){
						return "儿童";
					}else if(row.passageType == 1){
						return "成人";
					};
				}
				
			}, {
				width : '80',
				title : '证件类别',
				align : 'center',
				field : 'docType',
				formatter : function(value,row){
					if(row.docType ==1){
						return "身份证";
					}else if(row.docType==2){
						return "护照";
					};
				}
			}, {
				width : '100',
				title : '证件号',
				align : 'center',
				field : 'docId'
			}, {
				width : '100',
				title : '证件有效期',
				align : 'center',
				field : 'docExpireDate'
			}, {
				width : '100',
				title : '出生日期',
				align : 'center',
				field : 'birthDate'
			}, {
				width : '100',
				title : '手机号',
				align : 'center',
				field : 'mobile'
			}] ]

	});
	
	
});
</script>
</head>
<body>
	<!--弹出框-->
			<div id="popup">
					<span class="Poptitle">订单号</span><span class="Poptitle" id="payTypes">${orderNumber}</span>
					<div id="Tableposition">
						<table id="popTable"></table>
					</div>
					<!--<div id="butn">
						<p id="sure">确认对账</p><p id="detail">取消</p>
					</div>-->
			</div>
</body>
</html>